<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<script>
var image = new Image();
EventUtil.addHandler(image, "load", function(event){
    alert("Image loaded!");
});
EventUtil.addHandler(image, "error", function(event){
    alert("Image not loaded!");
});
image.src = "smilex.gif";  //指定不存在该文件 

</script>
</head>
<body>
</body>
</html> 



